package cn.walls1717.service.impl;

import cn.walls1717.domain.SysLog;
import cn.walls1717.mapper.SysLogMapper;
import cn.walls1717.service.SysLogService;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author CJ
 * @date 2020/8/16
 */
@Service
@Transactional(rollbackFor=Exception.class)
public class SysLogServiceImpl implements SysLogService {

    private SysLogMapper sysLogMapper;

    @Autowired
    public void setSysLogMapper(SysLogMapper sysLogMapper) {
        this.sysLogMapper = sysLogMapper;
    }

    @Override
    public void save(SysLog sysLog) throws Exception {
        sysLogMapper.save(sysLog);
    }

    @Override
    public List<SysLog> findAll() throws Exception {
        return sysLogMapper.findAll();
    }
}
